package com.gmall.console.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description: swagger 配置
 * @author: Jone
 * @create: 2024-05-27
 */
@Configuration
public class Swagger3Config {
    @Bean
    public OpenAPI api() {
        return new OpenAPI().info(new Info()
                        .title("欢迎使用Swagger3的API文档")
                        .version("3.0.0")
                        .license(new License().name("SpringDoc-OpenApi 2.0").url("https://springdoc.org/v1/#demos")));
    }
}
